package cn.edu.neusoft.demo.hospital2.Service.impl;

import cn.edu.neusoft.demo.hospital2.Dao.CarouselDao;
import cn.edu.neusoft.demo.hospital2.Service.CarouselService;
import cn.edu.neusoft.demo.hospital2.pojo.Carousel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CarouselServiceImpl implements CarouselService {
    @Autowired
    private CarouselDao carouselDao;

    public List<Carousel> selectAll() {
        return carouselDao.selectAllValidCarousels();
    }
    public Carousel selectById(int id) {
        return carouselDao.selectById(id);
    }
    public int insert(Carousel carousel) {
        return carouselDao.insert(carousel);
    }
    public int update(Carousel carousel) {
        return carouselDao.update(carousel);
    }
    public int deleteById(int id) {
        return carouselDao.deleteById(id);
    }
}
